#include "cesium/pipeline.hpp"

namespace Cesium {

Pipeline::Pipeline() {
}

Pipeline::~Pipeline() {
    for(std::set<Stage*>::iterator it = stages.begin(); it != stages.end(); it++)
        (*it)->unref();
    stages.clear();
}

void Pipeline::add(Stage* stage) {
    stage->ref();
    stages.insert(stage);
}

void Pipeline::remove(Stage* stage) {
    stage->unref();
    stages.erase(stage);
}

} // namespace Cesium
